package com.example.demo.service.impl;

import com.sun.org.apache.xpath.internal.operations.String;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

@Component
public class RedisMessageListener implements MessageListener {
    @Override
    public void onMessage(Message message, byte[] bytes) {
        byte[] body = message.getBody();
        byte[] topic = bytes;
        System.out.println(body);
        System.out.println(topic);
    }
}
